package com.huan.api;

import com.huan.config.StorageConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "my-storage",contextId = "my-storage",configuration = StorageConfiguration.class)
public interface StorageFeignApi {
    /**
     * 扣减库存
     * @return
     */
    @GetMapping("/decrease/{productId}/{count}")
    public String decrease(@PathVariable("productId")Long productId, @PathVariable("count") Integer count);

    /**
     * 测试
     * @return
     */
    @GetMapping("/TestOpenFeign/{id}")
    public String TestOpenFeign(@PathVariable("id")String id);
}
